﻿@using LY.Interface
@using LY.Business.ServiceImpl
@using LY.Entity.Entities
@{
    ViewBag.Title = "全局理财";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<link href="~/Content/Claims/Claims.css" rel="stylesheet" />

<div class="banner" id="banner">
    <a href="/Claims/JiFen" class="d1" style="background: url(../../Content/change/images/banner.jpg) center no-repeat;"></a>
    <a href="/Claims/ZhuanPan" class="d1" style="background: url(../../Content/change/images/banner3.jpg) center no-repeat;" target="_blank"></a>
    <a href="/Claims/Scan" class="d1" style="background: url(../../Content/change/images/banner2.jpg) center no-repeat;"></a>
    <div class="d2" id="banner_id">
        <ul>
            <li></li>
            <li></li>
            <li></li>
        </ul>
    </div>

</div>
<div class="focus_top">
    <span class="prev_top"></span>
    <span class="next_top"></span>
</div>
<div class="body">
    <!--数据统计-->
    @*        <div class="statics">
        <div class="s_01">
            <img src="../../Content/claims/c_01.gif" />
        </div>
        <div class="s_02">
            <div class="s_02_con">平台交易数据显示</div>
        </div>
        <div class="s_03">
            <img src="../../Content/claims/c_02.gif" />
        </div>
        <div class="s_04">
            <div class="s_04_con">
                <div class="s_04_con_01">
                    <div class="k">累计投资人数</div>
                    <div class="v">
                        <img src="../../Content/claims/c_03.gif" />&nbsp;
                        <span class=" numcountUp" num="0" num2="@ViewBag.Numbers" prefix="">@ViewBag.Numbers</span>
                    </div>
                </div>
                <div class="s_04_con_01">
                    <div class="k">为客户赚取收益(￥)</div>
                    <div class="v">
                        <img src="../../Content/claims/c_04.gif" />&nbsp;
                         <span class=" numcountUp" num="0" num2="@ViewBag.Profits" prefix="">@ViewBag.Numbers</span>
                    </div>
                </div>
                <div class="s_04_con_01">
                    <div class="k">累计筹资金额(￥)</div>
                    <div class="v">
                        <img src="../../Content/claims/c_04.gif" />&nbsp;
                         <span class=" numcountUp" num="0" num2="@(ViewBag.Amounts * 10000)" prefix="">@(ViewBag.Amounts * 10000)</span>
                    </div>
                </div>
            </div>
        </div>
    </div>*@
    <!--新手专享-->
    <div class="newshare">
        <div class="tit_pic">
        </div>
        <div class="new_con">
            @foreach (var item in (List<T_Project_EX>)ViewData["plist_new"])
            {
                var tp = item.DurationMonthOrDay == 1 ? "个月" : "天";
                var jindu = Math.Round((decimal)(new ClaimsService().GetAmountsByPid(item.ID.ToString()) * 100 / (item.TotalLoan * 10000)), 1);
                var rzjindu = jindu >= 100 ? 100 : jindu;
                <div class="con">
                    <div class="box">
                        <div class="jzf">新手标</div>

                    </div>
                    <div class="b_01"><a  href="/Claims/ToInvest/@item.ID">@item.ProjectName</a></div>
                    <div class="b_02">
                        <span class="v">@item.AnnualisedRatesStr</span>
                        <span class="k">%</span>
                        @if (item.AddAnnualisedRates > 0)
                        {
                            <div style="font-size: 20px; color: #FF5F00; margin: -50px 0px 0px 100px; height: 50px;">+@item.AddAnnualisedRatesStr%</div>
                        }
                    </div>
                    <div class="b_03">（预期年化收益率）</div>
                    <div class="b_03_01">
                        @item.ProjectDuration @tp
                    </div>
                    <div class="b_03_02">（项目期限）</div>
                    <div class="b_04">
                        <div class="b_04_con">
                            <div class="l">
                                <div class="bc_progress">
                                    <div class="progress" style="width:@rzjindu%"></div>
                                </div>
                            </div>
                            <div class="r">&nbsp;@rzjindu%</div>
                            <div class="clear"></div>
                        </div>
                    </div>
                    <div class="b_05">
                        <div class="tenbox">
                            @if (item.ProjectStatus == 1)
                            { 
                                <div class="tend projectstatus">
                                    <a href="/Claims/ToInvest/@item.ID">即将上线</a>
                                </div>
                            }
                            else if (item.ProjectStatus == 2)
                            { 
                                <div class="tend">
                                    <a href="/Claims/ToInvest/@item.ID">立即投资</a>
                                </div>
                            }
                            else if (item.ProjectStatus == 3)
                            {
                                <div class="tend projectstatus">
                                    <a href="/Claims/ToInvest/@item.ID">已经满标</a>
                                </div>
                            }
                            else if (item.ProjectStatus == 4)
                            {
                                <div class="tend projectstatus">
                                    <a href="/Claims/ToInvest/@item.ID">正在还款</a>
                                </div>
                            }
                            else if (item.ProjectStatus == 5)
                            {
                                <div class="tend projectstatus">
                                    <a href="/Claims/ToInvest/@item.ID">已经还款</a>
                                </div>
                            }
                            else
                            {
                                <div class="tend projectstatus">
                                    <a href="/Claims/ToInvest/@item.ID">筹标结束</a>
                                </div>
                            }
                        </div>
                    </div>
                </div>
            }
        </div>

    </div>
    <div class="clear"></div>
    <!--投资项目-->
    <div class="tend_pic">
    </div>
    <div class="tend_con">
        @foreach (var item in (List<T_Project_EX>)ViewData["plist_notnew"])
        {
            var tp = item.DurationMonthOrDay == 1 ? "个月" : "天";
            var jindu = Math.Round((decimal)(new ClaimsService().GetAmountsByPid(item.ID.ToString()) * 100 / (item.TotalLoan * 10000)), 1);
            var rzjindu = jindu >= 100 ? 100 : jindu;
            <div class="t_con">
                <div class="t_con_01">
                    <div class="v" style="width: 65%; float: left;">@item.AnnualisedRatesStr%</div>
                    <div class="vplus" style="width: 35%; float: left;">
                        @if (item.AddAnnualisedRates > 0)
                        {
                            <span style="font-size: 20px;">+@item.AddAnnualisedRatesStr%</span>
                        }
                    </div>
                    <div class="clear"></div>
                    <div class="k">（预期年化收益率）</div>
                </div>
                <div class="t_con_02">
                    <div class="s_top"></div>

                    <div class="s_body">
                        <div class="progress_line" style="width:@rzjindu%;"></div>
                        <div class="pro">
                            <div class="pro_title"><a href="/Claims/ToInvest/@item.ID">@item.ProjectName</a></div>
                            <div class="pro_con">
                                <div class="pro_list">
                                    <div class="v">@LY.Common.Utils.Tools.ConvertToMoney((long)(item.TotalLoan * 10000), false)</div>
                                    <div class="line"></div>
                                    <div class="k">项目总额</div>
                                </div>
                                <div class="pro_list">
                                    <div class="v">@item.ProjectDuration<span>@tp</span></div>
                                    <div class="line"></div>
                                    <div class="k">期限</div>
                                </div>
                                <div class="pro_list">
                                    <div class="v">@item.TendMembers<span>人</span></div>
                                    <div class="line"></div>
                                    <div class="k">投资人数</div>
                                </div>
                                <div class="pro_list">
                                    <div class="v">@rzjindu%</div>
                                    <div class="line"></div>
                                    <div class="k">
                                        @if (item.ProjectStatus == 1)
                                        { 
                                            <span>待上线</span>
                                        }
                                        else if (item.ProjectStatus == 2)
                                        { 
                                            <span>筹标中</span>
                                        }
                                        else if (item.ProjectStatus == 3)
                                        {
                                            <span>已满标</span>
                                        }
                                        else if (item.ProjectStatus == 4)
                                        {
                                            <span>还款中</span>
                                        }
                                        else if (item.ProjectStatus == 5)
                                        {
                                            <span>已还款</span>
                                        }
                                        else
                                        {
                                            <span>已结束</span>
                                        }
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="btn_tend">

                            @if (item.ProjectStatus == 1)
                            { 
                                <span class="span_tend projectstatus">
                                    <a href="/Claims/ToInvest/@item.ID">即将上线</a>
                                </span>
                            }
                            else if (item.ProjectStatus == 2)
                            { 
                                <span class="span_tend">
                                    <a href="/Claims/ToInvest/@item.ID">立即投资</a>
                                </span>
                            }
                            else if (item.ProjectStatus == 3)
                            {
                                <span class="span_tend projectstatus">
                                    <a href="/Claims/ToInvest/@item.ID">已经满标</a>
                                </span>
                            }
                            else if (item.ProjectStatus == 4)
                            {
                                <span class="span_tend projectstatus">
                                    <a href="/Claims/ToInvest/@item.ID">正在还款</a>
                                </span>
                            }
                            else if (item.ProjectStatus == 5)
                            {
                                <span class="span_tend projectstatus">
                                    <a href="/Claims/ToInvest/@item.ID">已经还款</a>
                                </span>
                            }
                            else
                            {
                                <span class="span_tend projectstatus">
                                    <a href="/Claims/ToInvest/@item.ID">筹标结束</a>
                                </span>
                            }

                        </div>
                    </div>
                    <div class="s_bottom"></div>
                </div>
                <div class="t_con_03">
                    <div class="s_right">
                    </div>
                </div>
            </div>
        }

    </div>

    <div style="font-size: 20px; text-align: center;">
        <a style="color: #696969;" href="/Claims/List">查看更多项目</a>
    </div>

    <!--投资排名-->
    <div class="park_pic">
    </div>
    <div class="parking">
        <div class="park_01">
            <table class="zq_table">
                <thead>
                    <tr>
                        <th>排名</th>
                        <th>投资人</th>
                        <th style="text-align: left; padding-left: 28px;">财富等级</th>
                        <th>投资总额</th>
                    </tr>
                </thead>
                <tbody style="">
                    @for (var i = 0; i < (ViewBag.ilist_hot.Count > 5 ? 5 : ViewBag.ilist_hot.Count); i++)
                    {
                        <tr>
                            <th>
                                <img src="~/Content/Images/orderedList@(i + 1).png" />
                            </th>
                            <th>@LY.Common.Utils.Tools.MyChar('*', 4, ViewBag.ilist_hot[i].Name, 1, 1)</th>
                            <th>
                                @for (var ii = 0; ii < ViewBag.ilist_hot[i].TenderAmtLevel; ii++)
                                { 
                                    <img src="~/Content/claims/relaxlevel_01.png" />
                                }
                            </th>
                            <th>@LY.Common.Utils.Tools.ConvertToMoney((long)ViewBag.ilist_hot[i].TenderAmt, false)</th>
                        </tr>
                    }
                </tbody>
            </table>

        </div>
        <div class="park_02">
            <table class="zq_table">
                <thead>
                    <tr>
                        <th>排名</th>
                        <th>投资人</th>
                        <th style="text-align: left; padding-left: 28px;">财富等级</th>
                        <th>投资总额</th>
                    </tr>
                </thead>
                <tbody>
                    @for (var i = 5; i < (ViewBag.ilist_hot.Count < 5 ? 4 : ViewBag.ilist_hot.Count); i++)
                    {
                        <tr>
                            <th>
                                <img src="~/Content/Images/orderedList@(i + 1).png" />
                            </th>
                            <th>@LY.Common.Utils.Tools.MyChar('*', 4, ViewBag.ilist_hot[i].Name, 1, 1) </th>
                            <th>
                                @for (var ii = 0; ii < ViewBag.ilist_hot[i].TenderAmtLevel; ii++)
                                {
                                    <img src="~/Content/claims/relaxlevel_02.png" />
                                }
                            </th>
                            <th>@LY.Common.Utils.Tools.ConvertToMoney((long)ViewBag.ilist_hot[i].TenderAmt, false)</th>
                        </tr>
                    }
                </tbody>
            </table>
        </div>
    </div>

</div>

<div style="clear: both;"></div>

<div class="four" style="margin-top: 100px;">
    <dl class="four_content">
        <dt>
            <img src="~/Content/Claims/change_20.jpg" /></dt>
        <dd class="four_title">安全保障</dd>
        <dd class="four_con">&nbsp;&nbsp;车辆、房产抵押手续齐全，债权列表清晰，每笔都有相对应的债权。最大限度保障用户利益。</dd>
    </dl>
    <dl class="four_content_two">
        <dt>
            <img src="~/Content/Claims/change_22.jpg"></dt>
        <dd class="four_title_two">实时监控</dd>
        <dd class="four_con">&nbsp;&nbsp;  对每一位用户我们都做到三位一体的实名认证，不会让不法分子钻漏洞，同时我们也保护每一位客户的信息隐私的安全。</dd>
    </dl>
    <dl class="four_content_three">
        <dt>
            <img src="~/Content/Claims/change_24.jpg"></dt>
        <dd class="four_title_three">投资灵活</dd>
        <dd class="four_con">&nbsp;&nbsp; 不同的项目产品，不同的回报收益，多样化的投资，让每一位客户都能找到适合自己的产品。</dd>
    </dl>
    <dl class="four_content_four">
        <dt>
            <img src="~/Content/Claims/change_17.jpg"></dt>
        <dd class="four_title_four">法律保护</dd>
        <dd class="four_con">&nbsp;&nbsp;优质的法律团队，用专业的法律知识为各阶层有投资理财意愿的人士服务，为个人投资理财提供一个坚实的法律保障。</dd>
    </dl>
</div>
<script src="~/Scripts/countUp.js"></script>
<script>
    $(document).ready(function () {
        banner();//初始加载Banner

        $(".new_con .con").eq(3).addClass("right_0");
        $(".t_con").hover(function () {
            $(this).children(".t_con_02").children(".s_body").addClass("eee");
            $(this).children(".t_con_03").children(".s_right").addClass("s_right_hover");
        }, function () {
            $(this).children(".t_con_02").children(".s_body").removeClass("eee");
            $(this).children(".t_con_03").children(".s_right").removeClass("s_right_hover");
        });
    });
</script>
<script>
    function banner() {
        var bn_id = 0;
        var bn_id2 = 1;
        var speed33 = 5000;
        var qhjg = 1;
        var MyMar33;
        $("#banner .d1").hide();
        $("#banner .d1").eq(0).fadeIn("slow");
        if ($("#banner .d1").length > 1) {
            $("#banner_id li").eq(0).addClass("nuw");
            function Marquee33() {
                bn_id2 = bn_id + 1;
                if (bn_id2 > $("#banner .d1").length - 1) {
                    bn_id2 = 0;
                }
                $("#banner .d1").eq(bn_id).css("z-index", "2");
                $("#banner .d1").eq(bn_id2).css("z-index", "1");
                $("#banner .d1").eq(bn_id2).show();
                $("#banner .d1").eq(bn_id).fadeOut("slow");
                $("#banner_id li").removeClass("nuw");
                $("#banner_id li").eq(bn_id2).addClass("nuw");
                bn_id = bn_id2;
            };

            MyMar33 = setInterval(Marquee33, speed33);

            $("#banner_id li").click(function () {
                var bn_id3 = $("#banner_id li").index(this);
                if (bn_id3 != bn_id && qhjg == 1) {
                    qhjg = 0;
                    $("#banner .d1").eq(bn_id).css("z-index", "2");
                    $("#banner .d1").eq(bn_id3).css("z-index", "1");
                    $("#banner .d1").eq(bn_id3).show();
                    $("#banner .d1").eq(bn_id).fadeOut("slow", function () { qhjg = 1; });
                    $("#banner_id li").removeClass("nuw");

                    $("#banner_id li").eq(bn_id3).addClass("nuw");
                    bn_id = bn_id3;
                }
            });
            $("#banner_id").hover(
                function () {
                    clearInterval(MyMar33);
                },
                function () {
                    MyMar33 = setInterval(Marquee33, speed33);
                }
            )
        }
        else {
            $("#banner_id").hide();
        }
    }
</script>
